
import turtle
import random
def triangle(color, dis):
    turtle.fillcolor(color)
    turtle.begin_fill()
    turtle.forward(dis)
    turtle.left(90)
    turtle.forward(dis)
    turtle.goto(0,0)
    turtle.right(90)
    turtle.end_fill()

turtle.colormode(255)
for i in range(8):
    r = random.randint(0, 255)
    g = random.randint(0, 255)
    b = random.randint(0, 255)
    triangle((r,g,b), 100)
    turtle.left(45)
turtle.done()